﻿#include <stdio.h>

//main09：switch...case选择表达式
int main09(void)
{
	int a = 10;
	switch (a)
	{
	case 1:
		printf("1.a的值为：%d\n", a);
		break;
	case 10:
		printf("2.a的值为：%d\n", a);//10
		break;
	default:
		printf("3.a的值到底是：%d\n", a);
		break;
	}

	int b;
	printf("4.请输入学生的成绩，按回车键结束：");//8
	scanf("%d", &b);
	switch (b / 10)
	{
	case 10:
		//printf("5.优秀！\n");
		//break;
	case 9:
		printf("6.优秀！\n");
		break;
	case 8:
		printf("7.良好！\n");
		break;
	case 7:
		//printf("8.及格！\n");
		//break;
	case 6:
		printf("9.及格！\n");
		break;
	default:
		printf("10.不及格！\n");//10.不及格！
		break;
	}
	return 0;
}